<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>embedme: SqliteWrapper类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.8 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li class="current"><a href="annotated.html"><span>类</span></a></li>
      <li><a href="files.html"><span>文件</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>类列表</span></a></li>
      <li><a href="classes.html"><span>类索引</span></a></li>
      <li><a href="hierarchy.html"><span>类继承关系</span></a></li>
      <li><a href="functions.html"><span>类成员</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="class_sqlite_wrapper-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">SqliteWrapper类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>Sqlite包装器类  
 <a href="class_sqlite_wrapper.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_sqlite_wrapper_8h_source.html">SqliteWrapper.h</a>&gt;</code></p>
<div class="dynheader">
类 SqliteWrapper 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_sqlite_wrapper.png" usemap="#SqliteWrapper_map" alt=""/>
  <map id="SqliteWrapper_map" name="SqliteWrapper_map">
<area href="class_data_base.html" title="数据库抽象类. " alt="DataBase" shape="rect" coords="0,0,91,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a40c6f1a1b1653d32f78e278b38add84f"><td class="memItemLeft" align="right" valign="top">sint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sqlite_wrapper.html#a40c6f1a1b1653d32f78e278b38add84f">open</a> (std::string dbName)</td></tr>
<tr class="memdesc:a40c6f1a1b1653d32f78e278b38add84f"><td class="mdescLeft">&#160;</td><td class="mdescRight">打开数据库  <a href="#a40c6f1a1b1653d32f78e278b38add84f">更多...</a><br /></td></tr>
<tr class="separator:a40c6f1a1b1653d32f78e278b38add84f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4c51d552be628cb7cbeb234d1095cc1"><td class="memItemLeft" align="right" valign="top">sint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sqlite_wrapper.html#ad4c51d552be628cb7cbeb234d1095cc1">connect</a> (std::string user, std::string passwd)</td></tr>
<tr class="memdesc:ad4c51d552be628cb7cbeb234d1095cc1"><td class="mdescLeft">&#160;</td><td class="mdescRight">连接数据库  <a href="#ad4c51d552be628cb7cbeb234d1095cc1">更多...</a><br /></td></tr>
<tr class="separator:ad4c51d552be628cb7cbeb234d1095cc1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb5508c06124105cbb102539f8da8b94"><td class="memItemLeft" align="right" valign="top">sint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sqlite_wrapper.html#afb5508c06124105cbb102539f8da8b94">close</a> ()</td></tr>
<tr class="memdesc:afb5508c06124105cbb102539f8da8b94"><td class="mdescLeft">&#160;</td><td class="mdescRight">关闭数据库  <a href="#afb5508c06124105cbb102539f8da8b94">更多...</a><br /></td></tr>
<tr class="separator:afb5508c06124105cbb102539f8da8b94"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a72f83af87d07cf115c814d6bb7c7d8c0"><td class="memItemLeft" align="right" valign="top">sint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sqlite_wrapper.html#a72f83af87d07cf115c814d6bb7c7d8c0">exec</a> (const std::string &amp;sql, <a class="el" href="struct_sql_result___s.html">SqlResult_S</a> *result=NULL)</td></tr>
<tr class="memdesc:a72f83af87d07cf115c814d6bb7c7d8c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">执行SQL语句  <a href="#a72f83af87d07cf115c814d6bb7c7d8c0">更多...</a><br /></td></tr>
<tr class="separator:a72f83af87d07cf115c814d6bb7c7d8c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa40cec147c960cc50f6992cca08760ab"><td class="memItemLeft" align="right" valign="top">sint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sqlite_wrapper.html#aa40cec147c960cc50f6992cca08760ab">insertBlob</a> (const std::string &amp;sql, std::string bindVarName, char *buf, sint32 len)</td></tr>
<tr class="memdesc:aa40cec147c960cc50f6992cca08760ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">插入二进制数据  <a href="#aa40cec147c960cc50f6992cca08760ab">更多...</a><br /></td></tr>
<tr class="separator:aa40cec147c960cc50f6992cca08760ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac45299aabcf122467fa7b91028895c76"><td class="memItemLeft" align="right" valign="top">sint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sqlite_wrapper.html#ac45299aabcf122467fa7b91028895c76">selectBlob</a> (const std::string &amp;sql, std::string bindVarName, char *buf, sint32 &amp;len)</td></tr>
<tr class="memdesc:ac45299aabcf122467fa7b91028895c76"><td class="mdescLeft">&#160;</td><td class="mdescRight">读取二进制数据  <a href="#ac45299aabcf122467fa7b91028895c76">更多...</a><br /></td></tr>
<tr class="separator:ac45299aabcf122467fa7b91028895c76"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>Sqlite包装器类 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a class="anchor" id="afb5508c06124105cbb102539f8da8b94"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">sint32 SqliteWrapper::close </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>关闭数据库 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">void</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回STATUS_OK,失败返回STATUS_ERROR </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

<p>实现了 <a class="el" href="class_data_base.html">DataBase</a>.</p>

</div>
</div>
<a class="anchor" id="ad4c51d552be628cb7cbeb234d1095cc1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">sint32 SqliteWrapper::connect </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>user</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>passwd</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>连接数据库 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">user</td><td>用户名 </td></tr>
    <tr><td class="paramname">passwd</td><td>密码 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回STATUS_OK,失败返回STATUS_ERROR </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

<p>实现了 <a class="el" href="class_data_base.html">DataBase</a>.</p>

</div>
</div>
<a class="anchor" id="a72f83af87d07cf115c814d6bb7c7d8c0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">sint32 SqliteWrapper::exec </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>sql</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_sql_result___s.html">SqlResult_S</a> *&#160;</td>
          <td class="paramname"><em>result</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>执行SQL语句 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">sql</td><td>SQL语句 </td></tr>
    <tr><td class="paramname">result</td><td>SQL执行结果 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回STATUS_OK,失败返回STATUS_ERROR </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

<p>实现了 <a class="el" href="class_data_base.html">DataBase</a>.</p>

</div>
</div>
<a class="anchor" id="aa40cec147c960cc50f6992cca08760ab"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">sint32 SqliteWrapper::insertBlob </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>sql</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>bindVarName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sint32&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>插入二进制数据 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">sql</td><td>SQL插入语句 </td></tr>
    <tr><td class="paramname">bindVarName</td><td>绑定变量名,格式为":name" </td></tr>
    <tr><td class="paramname">buf</td><td>数据缓存 </td></tr>
    <tr><td class="paramname">len</td><td>数据长度 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回STATUS_OK,失败返回STATUS_ERROR </dd></dl>
<dl class="section note"><dt>注解</dt><dd>每次只允许插入一条记录 </dd></dl>

<p>实现了 <a class="el" href="class_data_base.html">DataBase</a>.</p>

</div>
</div>
<a class="anchor" id="a40c6f1a1b1653d32f78e278b38add84f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">sint32 SqliteWrapper::open </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>dbName</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>打开数据库 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">dbName</td><td>数据库名字 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回STATUS_OK,失败返回STATUS_ERROR </dd></dl>
<dl class="section note"><dt>注解</dt><dd>如果dbName=":memory",表示打开内存数据库 </dd></dl>

<p>实现了 <a class="el" href="class_data_base.html">DataBase</a>.</p>

</div>
</div>
<a class="anchor" id="ac45299aabcf122467fa7b91028895c76"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">sint32 SqliteWrapper::selectBlob </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>sql</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>bindVarName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sint32 &amp;&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>读取二进制数据 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">sql</td><td>SQL查询语句 </td></tr>
    <tr><td class="paramname">bindVarName</td><td>绑定变量名,格式为":name" </td></tr>
    <tr><td class="paramname">buf</td><td>数据缓存 </td></tr>
    <tr><td class="paramname">len</td><td>数据长度 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回STATUS_OK,失败返回STATUS_ERROR </dd></dl>
<dl class="section note"><dt>注解</dt><dd>每次只允许读取一条记录 </dd></dl>

<p>实现了 <a class="el" href="class_data_base.html">DataBase</a>.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>libemb/inc/<a class="el" href="_sqlite_wrapper_8h_source.html">SqliteWrapper.h</a></li>
<li>libemb/src/SqliteWrapper.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2016年 七月 7日 星期四 19:49:39 , 为 embedme使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>
